package com.chinacoal.hr.levelboot;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.util.Calendar;
import java.util.Date;

/**
 * @author: YunTao.Li
 * @create: 2020-07-07 15:48
 * @description:
 **/
public class SimpleTest2 {

    public static void main(String[] args) {
        try {
//            String yrmonth = "2020-07-21";
////            SimpleDateFormat simple = new SimpleDateFormat("yyyy-MM");
//            SimpleDateFormat simple2 = new SimpleDateFormat("yyyy-MM-dd");
//            Date date = simple2.parse(yrmonth);
//            String str = new SimpleDateFormat("EEEE").format(date);
//
//            System.out.println(str);
//
////            Date yrmonthDate = simple.parse(yrmonth);
////
////            Calendar c = Calendar.getInstance();
////            c.setTime(yrmonthDate);
////            int lastDay = c.getActualMaximum(Calendar.DAY_OF_MONTH);
////            for (int x = 1; x <= lastDay; x++, c.add(Calendar.DATE, 1)) {
////                String dateStr = simple2.format(c.getTime());
////                System.out.println(dateStr);
////            }

            LocalDate currentLocalDate = LocalDate.now();
            currentLocalDate.getYear();
            currentLocalDate.getMonthValue();

            System.out.println(currentLocalDate.getYear());
            System.out.println(currentLocalDate.getMonthValue());
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
